home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Development Tools & Languages / DTSCPlusLibrary / Sources / Template.cp < prev    next >
Encoding:
Text File  |  1993-01-14  |  2.1 KB  |  99 lines  |  [TEXT/MPS ]

  1. /* _________________________________________________________________________________________________________ //
  2.   Copyright © 1992 Apple Computer, Inc. All rights reserved.
  3.   Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
  4.   Originator: Kent Sandvik
  5.   Date: Wednesday, June 10, 1992 22:37:30
  6.   Revision comments are at the end of this file.
  7.   ---
  8.   TFoo is an XXX class (•••define the class here).
  9.   Template.cp contains the class body information for the TFoo class member functions.
  10.   _________________________________________________________________________________________________________ */
  11.  
  12. // •••Include here the one and only C++ class header file
  13. // Include files
  14. #ifndef _FOO_
  15. #include "Template.h"
  16. #endif
  17.  
  18.  
  19. // _________________________________________________________________________________________________________ //
  20. // TFoo class member function implementations
  21.  
  22. //    CONSTRUCTORS & DESTRUCTORS
  23. #pragma segment Foo        // ••• Note that we use the same segment name as the file name for all member functions!                       
  24. TFoo::TFoo()
  25. // Default constructor.
  26. {
  27. }
  28.  
  29.  
  30.  
  31. #pragma segment Foo
  32. TFoo::~TFoo()
  33. // Destructor, we are not doing anything inside this one just now.
  34. {
  35. }
  36.  
  37.  
  38. //     MAIN INTERFACE
  39. #pragma segment Foo
  40. Boolean TFoo::KillApplication(ProcessSerialNumber*/*thePSN*/ )
  41. // Quit the application which is defined by the PSN
  42. {
  43.     return true;
  44. }
  45.  
  46.  
  47. #pragma segment Foo
  48. short TFoo::GetNumProcesses()
  49. // Get the amount of currently running processes.
  50. {
  51.     return (short)4;
  52. }
  53.  
  54.  
  55.  
  56. //    PUBLIC ACCESSORS AND MUTATORS            
  57.  
  58. #pragma segment Foo                       
  59. ProcessSerialNumber TFoo::GetMyProcessID() const
  60. {
  61.     return fMyProcessID;
  62. }
  63.  
  64.  
  65. // ITERATORS
  66.  
  67. #pragma segment Foo                       
  68. void TFoo::Next()
  69. {
  70. }
  71.  
  72.  
  73. #pragma segment Foo                       
  74. Boolean TFoo::Last()
  75. {
  76.     return fLast;
  77. }
  78.  
  79.  
  80. #pragma segment Foo                       
  81. void TFoo::First()
  82. {
  83.     fProcessID = fFirstPSN;
  84. }
  85.  
  86. #pragma segment Foo
  87. void TFoo::Reset()
  88. {
  89. }
  90.  
  91. // ••• Specify here the change history
  92. // _________________________________________________________________________________________________________ //
  93.  
  94. /*    Change History (most recent last):
  95.   No        Init.    Date        Comment
  96.   1            khs        6/10/92        New file
  97.   2            khs        7/6/92        First decent working class
  98. */
  99.